package com.sinosoft.emplmis.jobless.manager.impl;

import java.util.List;

import org.apache.log4j.Logger;

import com.github.pagehelper.PageHelper;
import com.sinosoft.emplmis.jobless.dao.KnryAideffectMapper;
import com.sinosoft.emplmis.jobless.entity.KnryAideffectEntity;
import com.sinosoft.emplmis.jobless.manager.KnryAideffectManager;
import com.sinosoft.emplmis.jobless.web.dto.JoblessSearchData;

public class KnryAideffectManagerImpl implements KnryAideffectManager{
   
	private KnryAideffectMapper knryAideffectMapper;
	
	public KnryAideffectMapper getKnryAideffectMapper() {
		return knryAideffectMapper;
	}

	public void setKnryAideffectMapper(KnryAideffectMapper knryAideffectMapper) {
		this.knryAideffectMapper = knryAideffectMapper;
	}
	
	@Override
	public List<KnryAideffectEntity> selectAll(JoblessSearchData data,String unemployedId) {
		Logger.getRootLogger().info("获取指定困难人员就业援助效果");
		PageHelper.startPage(data.getPage(), data.getRows());
		return knryAideffectMapper.selectAll(unemployedId);
	}

	@Override
	public int deleteByPrimaryKey(String id) {
		Logger.getRootLogger().info("根据主键删除困难人员就业援助效果");
		return knryAideffectMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(KnryAideffectEntity Entity) {
		Logger.getRootLogger().info("为指定困难人员添加就业援助效果");
		return knryAideffectMapper.insert(Entity);
	}
	
	@Override
	public KnryAideffectEntity selectByPrimaryKey(String id) {
		Logger.getRootLogger().info("根据主键回显困难人员的就业援助效果台账记录");
		return knryAideffectMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKey(KnryAideffectEntity record) {
		Logger.getRootLogger().info("更新指定困难人员的就业援助效果");
		return knryAideffectMapper.updateByPrimaryKey(record);
	}

	@Override
	public int count(String unemployedId) {
		Logger.getRootLogger().info("获取总条目数");
		return knryAideffectMapper.count(unemployedId);
	}

}
